/*
* @(#)EmailMessageComparator.java
*
* Copyright (c) 2004 DCIVision Ltd
* All rights reserved.
*
* This software is the confidential and proprietary information of DCIVision
* Ltd ("Confidential Information").  You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the license
* agreement you entered into with DCIVision Ltd.
*/

package com.dcivision.mail.core;

import java.util.Comparator;

/**
 * EmailMessageComparator.java
 * 
 * An interface for the comparator of an email message
 * 
 * @author      Beyond.Qu
 * @company     DCIVision Limited
 * @creation    14/01/2005
 * @version     $Revision: 1.8 $
 * @see com.dcivision.mail.bean.EmailMessage
 */
public interface EmailMessageComparator extends Comparator{

  public static final String REVISION = "$Revision: 1.8 $";

  /**
   * Indicator of sorting the email by its priority
   */
  public static final String SORT_BY_PRIORITY = "PRIORITY";

  /**
   * Indicator of sorting the email by its subject
   */
  public static final String SORT_BY_SUBJECT = "SUBJECT";
  
  /**
   * Indicator of sorting the email by its sender
   */
  public static final String SORT_BY_SENDER = "SENDER";
  
  /**
   * Indicator of sorting the email by its sent date
   */
  public static final String SORT_BY_SEND_DATE = "SEND_DATE";
  
  /**
   * Indicator of sorting the email by its size
   */
  public static final String SORT_BY_SIZE = "SIZE";

  /**
   * Indicator of sorting the email ascendingly
   */
  public static final String SORT_ASC = "ASC";

  /**
   * Indicator of sorting the email descendingly
   */
  public static final String SORT_DESC = "DESC";

  /**
   * Constant for the property name of an email's priority
   */
  public static final String PROP_NAME_PRIORITY = "priority";

  /**
   * Constant for the property name of an email's subject
   */
  public static final String PROP_NAME_SUBJECT = "subject";

  /**
   * Constant for the property name of an email's sender
   */
  public static final String PROP_NAME_SENDER = "sender";

  /**
   * Constant for the property name of an email's sent date
   */
  public static final String PROP_NAME_SENT_DATE = "sendDate";

  /**
   * Constant for the property name of an email's size
   */
  public static final String PROP_NAME_SIZE = "size";

  /**
   * Returns the property name of an email to be compared
   * @return The property name
   */
  public String getProperty ();

}
